home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / EModules / files / files.e next >
Encoding:
Text File  |  1997-11-30  |  3.2 KB  |  104 lines

  1. /*
  2. **  $VER: files.e V0.9B
  3. **
  4. **  File definitions.
  5. **
  6. **  (C) Copyright 1996-1997 DreamWorld Productions.
  7. **      All Rights Reserved
  8. */
  9.  
  10. OPT MODULE
  11. OPT EXPORT
  12. OPT PREPROCESS
  13.  
  14. MODULE 'dpkernel/dpkernel','system/register','misc/time'
  15.  
  16. /****************************************************************************
  17. ** Module information.
  18. */
  19.  
  20. CONST FILE_MODVERSION  = 0,
  21.       FILE_MODREVISION = 9
  22.  
  23. /****************************************************************************
  24. ** Mini structures for source and destination operations.
  25. */
  26.  
  27. OBJECT filename
  28.   id   :INT       /* ID_FILENAME */
  29.   name :LONG      /* Pointer to filename */
  30. ENDOBJECT
  31.  
  32. /* Memory pointer structure */
  33.  
  34. OBJECT memptr
  35.   id      :INT      /* ID_MEMPTR */
  36.   address :LONG     /* Pointer to memory area */
  37.   size    :LONG     /* Must supply a size unless you are a MemBlock */
  38. ENDOBJECT
  39.  
  40. /****************************************************************************
  41. ** File Object.
  42. */
  43.  
  44. CONST FILEVERSION = 1,
  45.       TAGS_FILE   = $FFFB0000 OR ID_FILE
  46.  
  47. OBJECT file
  48.   head[1]     :ARRAY OF head /* Standard header */
  49.   bytepos     :LONG          /* Current position in file */
  50.   size        :LONG          /* Total size of the file */
  51.   flags       :LONG          /* File flags */
  52.   source      :PTR TO head   /* Direct pointer to the original Source structure */
  53.   prev        :PTR TO file   /* Previous file in chain */
  54.   next        :PTR TO file   /* Next file in chain */
  55.   comment     :PTR TO CHAR   /* Pointer to comment string */
  56.   date        :PTR TO time   /* Set at time of creation */
  57.   permissions :LONG          /* User permission flags */
  58. ENDOBJECT
  59.  
  60. CONST FLA_BYTEPOS = TLONG OR 12,
  61.       FLA_SIZE    = TLONG OR 16,
  62.       FLA_FLAGS   = TLONG OR 20,
  63.       FLA_SOURCE  = TAPTR OR 24,
  64.       FLA_PREV    = TAPTR OR 28,
  65.       FLA_NEXT    = TAPTR OR 32,
  66.       FLA_COMMENT = TAPTR OR 36,
  67.       FLA_DATE    = TAPTR OR 40
  68.  
  69. CONST FPT_READ     = $00000001,
  70.       FPT_WRITE    = $00000002,
  71.       FPT_EXECUTE  = $00000004,
  72.       FPT_DELETE   = $00000008,
  73.       FPT_SCRIPT   = $00000010,
  74.       FPT_HIDDEN   = $00000020,
  75.       FPT_ARCHIVE  = $00000040,
  76.       FPT_PASSWORD = $00000080
  77.  
  78. /****************************************************************************
  79. ** Directory Object.
  80. */
  81.  
  82. CONST DIRVERSION     = 1,
  83.       TAGS_DIRECTORY = $FFFB0000 OR ID_DIRECTORY
  84.  
  85. OBJECT directory
  86.   head[1]     :ARRAY OF head     /* 00: Standard header */
  87.   childdir    :PTR TO directory  /* 12: First directory in list (master only) */
  88.   childfile   :PTR TO file       /* 16: First file in list (master only) */
  89.   source      :PTR TO filename   /* 20: Location and Name of this directory */
  90.   flags       :LONG              /* 24: Opening Flags (see file flags) */
  91.   comment     :PTR TO CHAR       /* 28: Pointer to comment string */
  92.   permissions :LONG              /* 32: User Flags */
  93.   date        :PTR TO time       /* 36: Set to time of creation */
  94.   next        :PTR TO directory  /* 40: Next directory in this list */
  95.   prev        :PTR TO directory  /* 44: Previous directory in this list */
  96. ENDOBJECT
  97.  
  98. CONST DIRA_Source      = TAPTR OR 20,
  99.       DIRA_Flags       = TLONG OR 24,
  100.       DIRA_Comment     = TAPTR OR 28,
  101.       DIRA_Permissions = TLONG OR 32,
  102.       DIRA_Date        = TAPTR OR 36
  103.  
  104.